<?

JCAT_Package::ImportClass('JCAT_ViewGtk',JCAT::PACKAGE_MVCGTK) ;

class UICtrlGtkToggleDlg extends JCAT_ViewGtk implements JCAT_IViewForm
{
	/**
	 * what's this
	 * 
	 * @access	public
	 * @param	$aParent=null	JCAT_ViewGtk		拥有此视图的对象
	 * @param	$aUI=null		JCAT_UIGtkGlade		模版引擎
	 * @return	array
	 */
	public function UICtrlGtkToggleDlg( JCAT_IViewContainer $aParent, JCAT_UIGtkGlade $aUI=null )
	{
		$this->JCAT_ViewGtk('UICtrlGtkToggleDlg','UICtrlGtkToggle','UICtrlGtkToggle',$aParent,$aUI) ;

		$this->AddUICtrl(JCAT_Package::ImportInstance( 'ButtonText', dirname(__FILE__) )) ;
		$this->AddUICtrl(JCAT_Package::ImportInstance( 'ButtonValue', dirname(__FILE__) )) ;
		
		$aUICtrl = new JCAT_UIGtkCtrlSelect('ButtonActive',JCAT_Language::Sentence('初始状态'),'SelButtonActive') ;
		$aUICtrl->AddOption( JCAT_Language::Sentence('选中'), 'JCAT_UIGtkCtrlCheckbox::Default_Actived' ) ;
		$aUICtrl->AddOption( JCAT_Language::Sentence('未选中'), 'JCAT_UIGtkCtrlCheckbox::Default_Unactive' ) ;
		$aUICtrl->AddOption( JCAT_Language::Sentence('by Glade'), 'JCAT_UIGtkCtrlCheckbox::Default_Null', true ) ;
		$this->AddUICtrl($aUICtrl) ;

		// 设置数据交换
		$aDataExchanger = $this->GetDataExchanger() ;
		$aDataExchanger->LinkUICtrlToDocumentData('ButtonText','ButtonText') ;
		$aDataExchanger->LinkUICtrlToDocumentData('ButtonValue','ButtonValue') ;
		$aDataExchanger->LinkUICtrlToDocumentData('ButtonActive','ButtonActive') ;
	}
	
	
}

?>